import java.io.IOException;
import java.net.DatagramPacket;
import java.net.DatagramSocket;
import java.net.SocketException;

public class Server {
	
	public static void main(String[] args)  throws SocketException, IOException {
		DatagramSocket socket = new DatagramSocket(8888);
		DatagramPacket packet = new DatagramPacket(new byte[64],64);
		while(true) {
			socket.receive(packet);
			byte[] re=packet.getData();
			System.out.println(new String(re,0,packet.getLength()));
		}
	}
}